import request from "@/utils/request";

//加载分类列表请求
export const pageCategoryList = (data) => request.get('/category/page',{params:data})

//修改分类信息
export const updateCategory = (data) => request.put('/category/update',data)

//添加分类信息
export const addCategory = (data) => request.post('/category/save',data)

//删除分类信息
export const deleteCategory = (id) => request.delete(`/category/delete/${id}`)

//根据type获取菜品/套餐分类信息
export const getCategoryByType = (type) => request.get(`/category/list/${type}`)

//获取所有的分类信息
export const getAllCategory = () => request.get('/category/list')